<?php

namespace App\Api\Contracts;


interface ApiResponseContract
{
    /*
     * 返回消息
     */

    // 返回信息与数据，不判断对错
    public function responseData(string $message, int $code, $datas, string $status): mixed;

    // 返回成功信息
    public function success(string $message = "request success", $datas, int $code): mixed;

    // 只返回失败信息
    public function fail(string $message = "request fail", $code): mixed;

    // 只返回错误异常
    public function error(string $message = "request error", $code): mixed;

    // 返回数据
    public function datas($datas, string $message): mixed;

}
